//
//  UserInfo.m
//  Cbchot
//
//  Created by wangyue on 15/12/15.
//  Copyright © 2015年 王越. All rights reserved.
//

#import "UserInfo.h"

@implementation UserInfo

-(void)encodeWithCoder:(NSCoder *)aCoder{
    [aCoder encodeObject:self.username forKey:@"username"];
    [aCoder encodeObject:self.password forKey:@"password"];
    [aCoder encodeObject:self.nickname forKey:@"nickname"];
    [aCoder encodeObject:self.sex forKey:@"sex"];
    [aCoder encodeObject:self.birthday forKey:@"birthday"];
    [aCoder encodeInt:self.level forKey:@"level"];
    [aCoder encodeInt:self.points forKey:@"points"];
    [aCoder encodeObject:self.mobile forKey:@"mobile"];
    [aCoder encodeObject:self.thirdBundling forKey:@"thirdBundling"];
    [aCoder encodeObject:self.userHeadicon forKey:@"userHeadicon"];
    
}
-(id)initWithCoder:(NSCoder *)aDecoder{
    if (self = [super init]) {
        self.username = [aDecoder decodeObjectForKey:@"username"];
        self.password = [aDecoder decodeObjectForKey:@"password"];
        self.nickname = [aDecoder decodeObjectForKey:@"nickname"];
        self.sex = [aDecoder decodeObjectForKey:@"sex"];
        self.birthday = [aDecoder decodeObjectForKey:@"birthday"];
        self.level = [aDecoder decodeIntForKey:@"level"];
        self.points = [aDecoder decodeIntForKey:@"points"];
        self.mobile = [aDecoder decodeObjectForKey:@"mobile"];
        self.thirdBundling = [aDecoder decodeObjectForKey:@"thirdBundling"];
        self.userHeadicon = [aDecoder decodeObjectForKey:@"userHeadicon"];
    }
    return self;
}

@end
